<?php

namespace App\Models\System;

use App\Models\Model;
use Illuminate\Support\Facades\DB;

class Menu extends Model
{


    public function children()
    {
        return $this->hasMany(self::class,'pid','id')
                ->select('menus.id','menus.pid','menus.name as title','menus.icon','menus.path as href','menus.is_ml as type','menus.openType')
                ->whereStatus(1)
                ->with(['children']);
    }

    


}
